import request from '@/utils/request'

// 获取档案树
export function getTrees(query) {
  return request({
    url: '/archive/trees/gettrees',
    method: 'get',
    params: query
  })
}

//点击树节点获取查询框
export function getqueryfieldList(data) {
  return request({
    url: '/archive/wjzl/getqueryfieldbytreenode',
    method: 'POST',
    data: data
  })
}

//点击树节点,获取table数据
export function getlistbytreenodeList(data) {
  var d={
    categoryId: data.categoryId,
    fields: data.fields,
    menuId: data.menuId,
    propertyName: data.propertyName,
    propertyValue: data.propertyValue,
    state: data.state,
    order: data.order,
    searchcolumn:data.searchcolumn,
    subTableName:data.sub_table_name,
    jsType: data.jsType
  }
  return request({
    url: '/archive/wjzl/getlistbytreenode?pageNum='+data.pageNum+'&pageSize='+data.pageSize,
    method: 'POST',
    data: d
  })
}

//获取表头
export function getthbytreenodeHeaderList(data) {
  return request({
    url: '/archive/wjzl/getthbytreenode',
    method: 'POST',
    data: data
  })
}

//文件整理删除
export function deleteData(data) {
  return request({
    url: '/archive/wjzl/delete',
    method: 'delete',
    data:data
  })
}

//删除电子文件
export function delDocument(query) {
  return request({
    url: '/archive/lxjs/delDocument',
    method: 'post',
    params: query
  })
}

//档案接收
export function jieshou(query) {
  return request({
    url: '/archive/szh/jieshouDa',
    method: 'POST',
    params: query
  })
}
//档案接收-数字化
export function jieshouSzhDa(query) {
  return request({
    url: '/archive/szh/jieshouSzhDa',
    method: 'POST',
    params: query
  })
}

// 著录组件
export function addDaFile(data) {
  return request({
    url: '/archive/szh/addYqdaDa',
    method: 'post',
    data: data
  })
}

// 修改组件
export function updateDaFile(data) {
  return request({
    url: '/archive/szh/updateYqdaDa',
    method: 'post',
    data: data
  })
}

//著录组卷
export function addDaFolder(data) {
  return request({
    url: '/archive/szh/addFolderDa',
    method: 'post',
    data: data
  })
}

//案卷著录
export function addDaFolder1(data) {
  return request({
    url: '/archive/szh/addFolderDa1',
    method: 'post',
    data: data
  })
}

//修改组卷
export function updateDaFolder(data) {
  return request({
    url: '/archive/szh/updateFolderDa',
    method: 'post',
    data: data
  })
}

//案卷修改
export function updateDaFolder1(data) {
  return request({
    url: '/archive/szh/updateFolderDa1',
    method: 'post',
    data: data
  })
}

//著录项目
export function addDaProject(data) {
  return request({
    url: '/archive/szh/addItemDa',
    method: 'post',
    data: data
  })
}

//修改项目
export function updateDaProject(data) {
  return request({
    url: 'archive/szh/updateItemDa',
    method: 'post',
    data: data
  })
}




// 文件整理--排卷号/排件号
export function pieceNumber(data) {
  return request({
    url: '/archive/wjzl/pieceNumber',
    method: 'put',
    data: data
  })
}

// 档案接收--排卷号/排件号
export function pieceNumber1(data) {
  return request({
    url: '/archive/wjzl/pieceNumber1',
    method: 'put',
    data: data
  })
}

// 文件整理--清空卷/件档号
export function clearNumber(data) {
  return request({
    url: '/archive/wjzl/clearNumber',
    method: 'put',
    data: data
  })
}

// 档案接收--清空卷/件档号
export function clearNumber1(data) {
  return request({
    url: '/archive/wjzl/clearNumber1',
    method: 'put',
    data: data
  })
}

// 手动排档号获取著录项值
export function getLastZlx(data) {
  return request({
    url: '/archive/wjzl/getLastZlx',
    method: 'post',
    data: data
  })
}

// 档案接收--手动排档号获取著录项值
export function getLastZlx3(data) {
  return request({
    url: '/archive/wjzl/getLastZlx3',
    method: 'post',
    data: data
  })
}

// 文件整理--手动排档号保存
export function insertPieceNumber(data) {
  return request({
    url: '/archive/wjzl/insertPieceNumber',
    method: 'put',
    data: data
  })
}

// 档案接收--手动排档号保存
export function insertPieceNumber1(data) {
  return request({
    url: '/archive/wjzl/insertPieceNumber1',
    method: 'put',
    data: data
  })
}



// 获取案卡信息
export function getInfomation(query) {
  return request({
    url: '/archive/guidang/getInfo',
    method: 'get',
    params: query
  })
}
//四性检测移交接收
export function handoverDetection(data) {
  return request({
    url: '/archive/detectionObject/handoverDetection',
    method: 'POST',
    data: data
  })
}
